package com.github.nuggets.repository;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.nuggets.model.entity.NuggetsDocumentEntity;
import com.github.nuggets.model.entity.State;
import com.github.nuggets.model.result.PageResult;

import java.util.List;
import java.util.Optional;

/**
 * @description:
 * @author: wangsj
 * @date: 2022/3/22 5:18 下午
 */
public interface DocumentRepository extends IService<NuggetsDocumentEntity> {

    Optional<NuggetsDocumentEntity> getDocumentByAccount(Long accountId, Long documentId);

    IPage<NuggetsDocumentEntity> listDocumentByAccount(Long accountId, Optional<State> state, Integer pageIndex, Integer pageSize);
}
